import { create } from 'zustand';
import { IShapeInfo } from '../types';

type State = {
  shapeInfo: Map<string, IShapeInfo>;
};
type Action = {
  setShapeInfo: (info: State['shapeInfo']) => void;
};

/**
 * 模型信息
 */
export const useShapeInfoStore = create<State & Action>((set) => ({
  shapeInfo: new Map<string, IShapeInfo>(),
  setShapeInfo: (shapeInfo: State['shapeInfo']) => set(() => ({ shapeInfo })),
}));
